refactor(asf): unify Dropwizard service bootstrap into common/auth#5983
refactor(asf): unify Dropwizard service bootstrap into common/auth#5983Ma77Ball wants to merge 3 commits into
Conversation
Automated Reviewer SuggestionsBased on the
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #5983 +/- ##
============================================
- Coverage 56.86% 56.50% -0.37%
+ Complexity 3027 3001 -26
============================================
Files 1127 1129 +2
Lines 43756 43706 -50
Branches 4736 4736
============================================
- Hits 24883 24695 -188
- Misses 17401 17561 +160
+ Partials 1472 1450 -22
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🔴 | bs=10 sw=10 sl=64 | 381 | 0.232 | 25,975/34,656/34,656 us | 🔴 +15.5% / 🔴 +134.4% |
| 🔴 | bs=100 sw=10 sl=64 | 820 | 0.501 | 122,609/139,481/139,481 us | 🔴 +13.5% / 🔴 +30.5% |
| ⚪ | bs=1000 sw=10 sl=64 | 958 | 0.585 | 1,033,881/1,092,394/1,092,394 us | ⚪ within ±5% / 🔴 +6.7% |
Baseline details
Latest main 1073b22 from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 381 tuples/sec | 436 tuples/sec | 786.27 tuples/sec | -12.6% | -51.5% |
| bs=10 sw=10 sl=64 | MB/s | 0.232 MB/s | 0.266 MB/s | 0.48 MB/s | -12.8% | -51.7% |
| bs=10 sw=10 sl=64 | p50 | 25,975 us | 22,490 us | 12,495 us | +15.5% | +107.9% |
| bs=10 sw=10 sl=64 | p95 | 34,656 us | 33,286 us | 14,784 us | +4.1% | +134.4% |
| bs=10 sw=10 sl=64 | p99 | 34,656 us | 33,286 us | 18,468 us | +4.1% | +87.7% |
| bs=100 sw=10 sl=64 | throughput | 820 tuples/sec | 875 tuples/sec | 991.49 tuples/sec | -6.3% | -17.3% |
| bs=100 sw=10 sl=64 | MB/s | 0.501 MB/s | 0.534 MB/s | 0.605 MB/s | -6.2% | -17.2% |
| bs=100 sw=10 sl=64 | p50 | 122,609 us | 112,124 us | 100,929 us | +9.4% | +21.5% |
| bs=100 sw=10 sl=64 | p95 | 139,481 us | 122,884 us | 106,894 us | +13.5% | +30.5% |
| bs=100 sw=10 sl=64 | p99 | 139,481 us | 122,884 us | 114,085 us | +13.5% | +22.3% |
| bs=1000 sw=10 sl=64 | throughput | 958 tuples/sec | 944 tuples/sec | 1,023 tuples/sec | +1.5% | -6.3% |
| bs=1000 sw=10 sl=64 | MB/s | 0.585 MB/s | 0.576 MB/s | 0.624 MB/s | +1.6% | -6.3% |
| bs=1000 sw=10 sl=64 | p50 | 1,033,881 us | 1,060,649 us | 983,835 us | -2.5% | +5.1% |
| bs=1000 sw=10 sl=64 | p95 | 1,092,394 us | 1,093,746 us | 1,023,777 us | -0.1% | +6.7% |
| bs=1000 sw=10 sl=64 | p99 | 1,092,394 us | 1,093,746 us | 1,053,883 us | -0.1% | +3.7% |
Raw CSV
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,525.23,200,128000,381,0.232,25974.80,34655.58,34655.58
1,100,10,64,20,2438.22,2000,1280000,820,0.501,122609.08,139480.92,139480.92
2,1000,10,64,20,20878.19,20000,12800000,958,0.585,1033880.85,1092393.69,1092393.69 per-service init/run paths
Raise patch coverage for the bootstrap-unification
refactor, which had
left the extracted glue uncovered (Codecov patch was
~29%).
- ServiceBootstrapSpec: exercise initDatabase (the
shared SQL pool setup),
tolerating the no-DB case so it runs whether or
not a Postgres is reachable.
- Add initialize()/run() tests to each service
RunSpec so the bootstrap
wiring (configure, initDatabase, config-file path,
auth stack, HTTP path)
is executed and asserted.
initDatabase mutates the JVM-wide SqlServer
singleton that the DB-backed
suites in auth/access-control/notebook-migration
rely on, so mark those
three modules Test / parallelExecution := false to
keep the suites hermetic.
What changes were proposed in this PR?
ServiceBootstrapincommon/authwith three shared helpers:configure(YAML env-var substitution +DefaultScalaModuleregistration),initDatabase(open the SQL connection pool fromStorageConfig), andconfigFilePath(resolve$TEXERA_HOME/<service>/src/main/resources/<file>).ServiceBootstrap, removing the duplicatedinitialize()/initConnection/main()boilerplate.WorkflowCompilingServiceat the sharedRequestLoggingFilter.registerinstead of its hand-rolled inline servlet filter, andNotebookMigrationServiceat the sharedAuthFeatures.registerinstead of its own identicalregisterAuthFeatures.jackson-module-scalaas aprovideddependency ofcommon/authforServiceBootstrap'sDefaultScalaModule.Any related issues, documentation, discussions?
Closes: #5982
How was this PR tested?
ServiceBootstrapSpec: runsbt -J-Dnet.bytebuddy.experimental=true "Auth/testOnly *ServiceBootstrapSpec", expect it to verifyconfigurewraps the config source provider and registers the Scala module, and thatconfigFilePathreturns an absolute path ending in the conventional<service>/src/main/resources/<file>suffix.sbt "ConfigService/testOnly *RunSpec" "AccessControlService/testOnly *RunSpec" "WorkflowCompilingService/testOnly *RunSpec" "ComputingUnitManagingService/testOnly *RunSpec" "NotebookMigrationService/testOnly *RunSpec"plusAuthFeaturesSpec, confirming each service still registers the same resources and auth stack.sbt "Auth/compile" "ConfigService/compile" "AccessControlService/compile" "FileService/compile" "ComputingUnitManagingService/compile" "WorkflowCompilingService/compile" "NotebookMigrationService/compile".-J-Dnet.bytebuddy.experimental=trueandFileServiceRunSpeccould not be instrumented locally; all of these run normally on CI's JDK 21.Was this PR authored or co-authored using generative AI tooling?
Co-authored with Claude Opus 4.8 in compliance with ASF